package com.liang.jiekou.service.impl;

import com.liang.jiekou.service.HttpClientService;
import com.liang.jiekou.service.SheHeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.io.IOException;

@Service
@Slf4j
public class SheHeServiceImpl implements SheHeService {

    @Resource
    private HttpClientService httpClientService;


    @Override
    public String ShenHe(String url, String json) {
        String result = null;
        try {
            result = httpClientService.postRequest(url, json);

            log.info(result);
        }catch (IOException e){
            //System.out.println("出现异常请查看审批后台是否开启");
            log.info("出现异常请查看审批后台是否开启");
            System.out.println(e);
        }

        return result;
    }
}
